<div class="_j_commentlist">
    <div class="rev-list">
        <ul>
            <#list  page.content as p>
                <li class="rev-item comment-item clearfix">
                    <div class="user"><a class="avatar" href="/destination/guide?id=${qo.destId}"
                                         target="_blank"><img
                                    src="${p.headUrl!}"
                                    width="48" height="48"></a><span class="level">LV.${p.level}</span>
                    </div>
                    ${p.username!}
                    <div class="review-item item-star">
                        <div class="review-star _j_rankblock" data-star="" data-name="rank_star">
                            <input type="hidden" name="startNum" value="${p.startNum}" essential="1">
                            <span class="_j_starcount star star${p.startNum}"></span>
                            <div class="click-star _j_starlist">
                                <a role="button" title="不建议" rel="nofollow" class="suggest"
                                   data-star="1"></a>
                                <a role="button" title="有待改善" rel="nofollow" class="suggest"
                                   data-star="2"></a>
                                <a role="button" title="还可以" rel="nofollow" class="suggest"
                                   data-star="3"></a>
                                <a role="button" title="值得一去" rel="nofollow" class="suggest"
                                   data-star="4"></a>
                                <a role="button" title="强烈推荐" rel="nofollow" class="suggest"
                                   data-star="5"></a>
                            </div>
                        </div>
                    </div>
                    <i></i>
                    <a class="useful" data-sid="${qo.scenicId}" title="点赞">
                        <i></i><span class="useful-num">点赞</span>
                    </a>
                    <div class="rev-img">
                        <#list  p.picVO as pic>
                            <a href="#" target="_blank"><img
                                        src="${pic.name!}"
                                        width="200" height="120"></a>
                        </#list>
                    </div>
                    ${p.content!}
                    <br>
                    <div class="mcmt-bot">
                        <div class="time">${(p.createTime?string('yyyy-MM-dd HH:ss'))!}</div>
                        <div class="option">
                            <a role="button" class="_j_reply replyBtn" data-touser="${p.username!}"
                               data-toid="${p.id!}">回复</a>
                        </div>
                    </div>
                </li>
            </#list>
        </ul>
    </div>
</div>
<script>
    $("#pagination").jqPaginator({
        totalPages: ${page.totalPages!0},
        visiblePages: 5,
        currentPage: ${page.number+1} || 1,
        prev
    :
    '<a class="prev" href="javascript:void(0);">上一页<\/a>',
        next
    :
    '<a class="next" href="javascript:void(0);">下一页<\/a>',
        page
    :
    '<a href="javascript:void(0);">{{page}}<\/a>',
        last
    :
    '<a class="last" href="javascript:void(0);" >尾页<\/a>',
        onPageChange
    :

    function (page, type) {
        if (type == 'change') {
            $("#currentPage").val(page);
            $("#searchForm").submit();
        }

    }
    })
    $('.useful').click(function () {
        var sid = $(this).data('sid');
        console.log(sid);
        $.get('/scenic/commentThumbUp', {sid: sid}, function (data) {
            console.log(data);
            if (data.success) {
                $(this).addClass("on")
                popup("点赞成功")
            } else {
                if (data.code == 102) {
                    $(this).removeClass("on")

                } else {
                    $(this).removeClass("on")
                    popup("取消点赞")
                }
            }
        })
    })
</script>